package com.outlandr.irc.server;

import java.io.PrintWriter;

public class User {
	
	private String nick;
	private String name;
	private String userInfo;
	private PrintWriter out;
	private String userName;
	private String hostName;
	private String realName;

	public User(String nick, String userInfo, String hostName, PrintWriter out) {
		this.nick = nick;
		this.out = out;
		
		this.userInfo = userInfo;
		String[] temp = userInfo.split(" ");
		this.userName = temp[1];
		this.hostName = hostName;
		
		temp = userInfo.split(":");
		this.realName = temp[1];
	}

	public String getNick() {
		return nick;
	}

	public void sendMessage(String msg) {
		out.println(msg);
	}

	public String getUserName() {
		return userName;
	}
	
	public String getHostName() {
		return hostName;
	}

}
